﻿using Adnc.Infra.Entities;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace WYT.Pro.Repository.Entites
{
    /// <summary>
    /// 赠品
    /// </summary>
    [Table("pro_Gift"), Comment("赠品"), Index(nameof(ParentGoodsSizeId))]
    public class GoodsGift : EfEntity
    {
        /// <summary>
        /// 所属商品
        /// </summary>
        [Comment("所属商品")]
        public long ParentGoodsId { get; set; }

        /// <summary>
        /// 所属商品的规格
        /// </summary>
        [Comment("所属商品的规格")]
        public long ParentGoodsSizeId { get; set; }

        /// <summary>
        /// 赠品ID
        /// </summary>
        [Comment("赠品ID")]
        public long GoodsId { get; set; }

        /// <summary>
        /// 赠品规格ID
        /// </summary>
        [Comment("赠品规格ID")]
        public long SizeId { get; set; }

        /// <summary>
        /// 单次购买量
        /// </summary>
        [Comment("单次购买量")]
        public int BuyCount { get; set; }

        /// <summary>
        /// 赠送数量
        /// </summary>
        [Comment("赠送数量")]
        public int Count { get; set; }

        /// <summary>
        /// 是否可以叠加
        /// </summary>
        [Comment("是否可以叠加")]
        public bool IsSuperposition { get; set; }

        /// <summary>
        /// 赠品总数
        /// </summary>
        [Comment("赠品总数")]
        public int LimitCount { get; set; }

        /// <summary>
        /// 剩余的数量
        /// </summary>
        [Comment("剩余的数量")]
        public int RemainderCount { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Comment("创建时间")]
        public DateTime CreateTime { get;set; }

        /// <summary>
        /// 状态
        /// </summary>
        [Comment("状态")]
        public bool IsDelete { get; set; } 
    }
}
